<!doctype html>
<!-- Wire, Copyright (C) 2022 Wire Swiss GmbH -->
<!-- <%= VERSION %> -->
<html id="wire-main-app">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="geoip" content="{{ country }}" />
    <link href="./image/favicon.ico?<%= VERSION %>" type="image/x-icon" rel="shortcut icon" sizes="48x48" />
    <link href="./image/meta/wire-icon-256.png?<%= VERSION %>" rel="icon" sizes="256x256" type="image/png" />
    <link href="./image/meta/wire-icon-128.png?<%= VERSION %>" rel="icon" sizes="128x128" type="image/png" />
    <link href="./image/meta/wire-icon-64.png?<%= VERSION %>" rel="icon" sizes="64x64" type="image/png" />

    <meta property="og:title" content="<%= OPEN_GRAPH_TITLE %>" />
    <meta property="og:description" name="description" content="<%= OPEN_GRAPH_DESCRIPTION %>" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="<%= APP_BASE %>" />
    <meta property="og:image" content="<%= OPEN_GRAPH_IMAGE_URL %>" />

    <title><%= BRAND_NAME %></title>

    <script src="./min/basicBrowserFeatureCheck.js?v=<%= VERSION %>"></script>
    <script src="./min/checkBrowser.js?v=<%= VERSION %>"></script>

    <script src="./libs/wire/telemetry/embed.js"></script>
    <link href="./min/core-crypto-ffi_bg.wasm" rel="prefetch" />
  </head>

  <body>
    <main id="wire-app">
      <style>
        body {
          margin: 0;
        }

        #loader-root {
          align-items: center;
          background-color: #fafafa;
          color: #676b71;
          display: flex;
          flex-direction: column;
          height: 100%;
          justify-content: center;
          position: absolute;
          width: 100%;
        }

        .loading-spinner {
          width: 24px;
          height: 24px;
          border: 3px solid #000;
          border-bottom-color: transparent;
          border-radius: 50%;
          display: inline-block;
          box-sizing: border-box;
          animation: rotation 1s linear infinite;
        }

        #loading-message {
          display: none;
          margin-top: 20px;
          padding-inline: 16px;
        }

        #loading-message p {
          color: #676b71;
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
            'Segoe UI Emoji';
          font-size: 12px;
          line-height: 14px;
          margin: 0;
          text-align: center;
        }

        #loading-message.visible {
          display: block;
        }

        @keyframes rotation {
          0% {
            transform: rotate(0deg);
          }
          100% {
            transform: rotate(360deg);
          }
        }
      </style>

      <div id="loader-root">
        <div class="loading-spinner"></div>
        <div id="loading-message"></div>
      </div>
    </main>

    <script src="./min/loader.js?v=<%= VERSION %>"></script>
    <script src="./config.js"></script>
    <script src="./min/dexie.js?v=<%= VERSION %>"></script>
    <script src="./min/vendor.js?v=<%= VERSION %>"></script>
    <script src="./min/runtime.js?v=<%= VERSION %>"></script>
    <script src="./min/app.js?v=<%= VERSION %>"></script>
  </body>
</html>
